<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class AddImageToProductsTalbe extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('products', function (Blueprint $table) {
            $table->string('xc_image')->nullable()->comment('cover image');
            $table->string('zq_image')->nullable()->comment('cover image');
            $table->string('yh_image')->nullable()->comment('cover image');
            $table->string('xj_image')->nullable()->comment('cover image');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('products', function (Blueprint $table) {
             $table->dropColumn(['xc_image','zq_image','yh_image','xj_image']);
        });
    }
}
